<?php
namespace app\admin\controller;
use think\Loader;
class Consul extends Base{


    //咨询类型
    public function consul_type(){
        $invoking     = Loader::model('Consul','service');
        $data         = $invoking->consulType();
        $this->assign('list', $data['list']);
        $this->assign('page', $data['page']);
        return $this->fetch();
    }


    //咨询类型查询
    public function consulTypeFind(){
        $consult_type_id = input('consult_type_id');
        $invoking     = Loader::model('Consul','service');
        $data         = $invoking->consulTypeFind($consult_type_id);
        return json($data);
    }

    //咨询类型
    public function consult_list(){
        $invoking     = Loader::model('Consul','service');
        $data         = $invoking->consultList();
        $type_list         = $invoking->consultTypeSelect();
        $this->assign('type_list', $type_list);
        $this->assign('list', $data['list']);
        $this->assign('page', $data['page']);
        $this->assign('post', $data['post']);
        return $this->fetch();
    }

    //短信推送设置
    public function consult_sie(){
        $invoking     = Loader::model('Consul','service');
        $data         = $invoking->consultSie();
        $this->assign('list', $data['list']);
        $this->assign('page', $data['page']);
        return $this->fetch();
    }

    //待回复咨询
    public function me_consult(){
        $invoking     = Loader::model('Consul','service');
        $data         = $invoking->meConsult();
        $this->assign('list', $data['list']);
        $this->assign('page', $data['page']);
        $this->assign('post', $data['post']);
        return $this->fetch();
    }

    //咨询查询
    public function meReplsyFind(){
        $consult_id = input('consult_id');
        $invoking     = Loader::model('Consul','service');
        $data         = $invoking->meReplsyFind($consult_id);
        return json($data);
    }

    //咨询详情
    public function consult_datals(){
        $consult_id = input('consult_id');
        $invoking     = Loader::model('Consul','service');
        $data         = $invoking->consultDatals($consult_id);
        $this->assign('list', $data['list']);
        $this->assign('info', $data['data']);
        return $this->fetch();
    }
}
